<template>
  <p>子组件</p>
  <p>foo :{{ foo }}</p>
  <p>age :{{ age }}</p>
</template>

<script>
export default {
  // props:['foo','age']
  props: {
    foo: {
      type: String
    },
    age: {
      type: Number
    }
  },
  setup(props) {
    console.log(props)
    console.log(props.foo)
    console.log(props.age)
  }
}
</script>
